package com.gzy.xuexiziliao.mapper;

import com.gzy.xuexiziliao.pojo.entity.Review;
import com.gzy.xuexiziliao.pojo.entity.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ReviewMapper {

    @Insert("insert into review (student_name,review_type,content,create_time,update_time,phone) " +
            "values (#{studentName},#{reviewType},#{content},#{createTime},#{updateTime},#{phone})")
    void addreview(Review review);

    @Select("select * from review where review_id = #{reviewId}")
    Review getReview(Integer reviewId);


    List<Review> list(String name, Short gender, LocalDate begin, LocalDate end);
}
